package com.edu.app.mapper.core;

import com.baomidou.mybatisplus.annotation.SqlParser;
import com.edu.app.bean.core.SysActivity;
import com.edu.app.util.AppBaseMapper;

import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface SysActivityMapper extends AppBaseMapper<SysActivity> {
    @SqlParser(filter=true)
    @Select("SELECT * FROM S_ACTIVITY ORDER BY time DESC")
    List<SysActivity> getObjectList();

    @Select("DELETE FROM S_ACTIVITY WHERE type_id = #{type_id}")
    Integer deleteActivityByTypeId(Integer type_id);
}
